package com.lifl.b328.garden.model;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public abstract class CacheDAO<T> {
	protected SQLiteDatabase db;
	
	public void setDB(SQLiteDatabase db){
		this.db = db;
	}
	
	public abstract long  add(T obj);
	public abstract long delete(long rowid);
	public abstract long  edit(T obj,long rowid);
	public abstract T  getByColumn(String column, Object valeur);
	public abstract T  getById(long id);
	public abstract Cursor getAll(long id);
	public abstract Cursor getAll(long id, String order);
	
}
